import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { IdCardService } from './id-card.service';
import { CreateIdCardDto } from './dto/create-id-card.dto';
import { UpdateIdCardDto } from './dto/update-id-card.dto';

@Controller('idCard')
export class IdCardController {
  constructor(private readonly idCardService: IdCardService) {}

  @Post()
  create(@Body() createIdCardDto: CreateIdCardDto) {
    return this.idCardService.create(createIdCardDto);
  }

  @Get()
  findAll() {
    return this.idCardService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.idCardService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateIdCardDto: UpdateIdCardDto) {
    return this.idCardService.update(+id, updateIdCardDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.idCardService.remove(+id);
  }
}
